/**
 * AgentsAccountService.java
 * Copyright(C) 1949++ 中华人民共和国
 * 深圳市盛开互联网金融顾问有限公司.
 * All rights reserved.
 * E-mail:server@skjr.net
 * SKDate:2017-11-16 17:28:58
 */
package com.huamao.zh.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.huamao.zh.base.PageWrapper;
import com.huamao.zh.mapper.AgentsAccountMapper;
import com.huamao.zh.model.AgentsAccount;
import com.huamao.zh.service.AgentsAccountService;

@Service
@Transactional
public class AgentsAccountServiceImpl implements AgentsAccountService {

	@Autowired
	private AgentsAccountMapper agentsAccountMapper;

	/**
	 * 功能说明： Author： SKDate:2017-11-16 17:28:58
	 */
	public AgentsAccount add(AgentsAccount agentsAccount) throws Exception {
		agentsAccountMapper.add(agentsAccount);
		return agentsAccount;
	}

	/**
	 * 功能说明： Author： SKDate:2017-11-16 17:28:58
	 */
	public AgentsAccount addSelective(AgentsAccount agentsAccount) throws Exception {
		agentsAccountMapper.addSelective(agentsAccount);
		return agentsAccount;
	}

	/**
	 * 功能说明： Author： SKDate:2017-11-16 17:28:58
	 */
	public int delete(Map<String, Object> map) {
		return agentsAccountMapper.delete(map);
	}

	/**
	 * 功能说明： Author： SKDate:2017-11-16 17:28:58
	 */
	public int update(AgentsAccount agentsAccount) throws Exception {
		return agentsAccountMapper.update(agentsAccount);
	}

	public int scoreToKaiyuan(AgentsAccount agentsAccount) throws Exception {
		return agentsAccountMapper.scoreToKaiyuan(agentsAccount);
	}

	/**
	 * 功能说明： Author： SKDate:2017-11-16 17:28:58
	 */
	public int updateSelective(AgentsAccount agentsAccount) throws Exception {
		return agentsAccountMapper.updateSelective(agentsAccount);
	}

	/**
	 * 功能说明： Author： SKDate:2017-11-16 17:28:58
	 */
	public AgentsAccount get(Integer accountId) {
		AgentsAccount agentsAccount = agentsAccountMapper.get(accountId);
		return agentsAccount;
	}

	/**
	 * 功能说明： Author： SKDate:2017-11-16 17:28:58
	 */
	public PageWrapper<AgentsAccount> search(PageWrapper<AgentsAccount> pageWrapper) {
		List<AgentsAccount> agentsAccounts = agentsAccountMapper.search(pageWrapper);
		pageWrapper.setList(agentsAccounts);
		return pageWrapper;
	}

	/**
	 * 功能说明： Author： SKDate:2017-11-16 17:28:58
	 */
	public List<AgentsAccount> queryList(Map<String, Object> map) {
		return agentsAccountMapper.queryList(map);
	}

	public List<AgentsAccount> queryScoreList(Map<String, Object> map) {
		return agentsAccountMapper.queryScoreList(map);
	}
}